Repository navigation
Conversation
|
[ch10321] |
|
This pull request has been linked to Shortcut Story #10321: Async in gRPC client. |
|
@benjaminran can you review? |
|
@mutayroei @benjaminran |
benjaminran
left a comment
There was a problem hiding this comment.
Posted a couple comments about the async logic.
The error handling logic looks good! I think it's a good thing to include the _InactiveRpcError deeper inside the trace.
| try: | ||
| if not async_req: | ||
| return parse_upsert_response(self._wrap_grpc_call(self.stub.Upsert, request, timeout=timeout)) | ||
| return self.executor.submit(self._wrap_grpc_call, self.stub.Upsert, request, timeout=timeout) |
There was a problem hiding this comment.
grpc-python already has async support - putting this ThreadpoolExecutor here is adding an unnecessary thread in the picture, which we can do away with if we use the existing grpc-python async interface (anyways grpc is managing the threads making the actual requests). See https://grpc.io/docs/languages/python/basics/#simple-rpc-1 > "An asynchronous call to GetFeature is similar...".
This also would also save us and users from a fair bit of complexity - e.g. users having to update both our timeout and the grpc request deadline, both our threadpool size and maybe the grpc threadpool size.
Secondly, we should at least make the write operations both support async (i.e. add delete too) if either of them supports it. And maybe it's easy enough to add for all operations?
…920d ci: add Python 3.14 to the test matrix
Closes the critical Dependabot alert (#15, AnyIO TLSStream IDNA 2003 host name encoding) and the medium one (#14, process-pool stderr blocking). typing-extensions moves to 4.16.0 because anyio 4.15 requires it. The dev-group floor goes to 4.14.2 so a re-resolve cannot land on a vulnerable version. Co-Authored-By: Claude <noreply@anthropic.com>
No description provided.